//
//  EmptyView.m
//  xinxinshangnong
//
//  Created by 度周末网络-王腾 on 16/5/18.
//  Copyright © 2016年 Suzhou fish Information Technology Co., Ltd. All rights reserved.
//

#import "EmptyView.h"

@implementation EmptyView

+(instancetype)getInstance{
    EmptyView *emptyView = [[[NSBundle mainBundle] loadNibNamed:@"EmptyView" owner:self options:nil] lastObject];
    emptyView.frame  = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height);
    return emptyView;
}

- (IBAction)reloadBtnAction:(UIButton *)sender {
    if ([self.delegate respondsToSelector:@selector(emptyReloadBtnAction)]) {
        [self.delegate emptyReloadBtnAction];
    }
    
}


-(void)awakeFromNib{
//    [self.reloadBtn setBackgroundColor:[UIColor whiteColor]];
//    self.reloadBtn.layer.cornerRadius = self.reloadBtn.frame.size.height *0.5;
//    self.reloadBtn.layer.borderColor = [UIColor colorWithRed:220.0/255.0 green:220.0/255.0 blue:220.0/255.0 alpha:1].CGColor;
//    self.reloadBtn.layer.borderWidth = 0.45;
}

-(void)showByView:(UIView *)view{
    
    [self removeFromSuperview];
    
    
    self.center = CGPointMake([UIScreen mainScreen].bounds.size.width*0.5, [UIScreen mainScreen].bounds.size.height*0.5);
    
    [view addSubview:self];
}

@end
